package com.subject.application.controller;

import com.subject.common.entity.Result;
import com.subject.infra.basic.dto.SubjectCategoryDto;
import com.subject.infra.basic.entity.SubjectCategoryEntity;
import com.subject.infra.basic.mappers.SubjectCategoryMapper;
import com.subject.infra.basic.service.SubjectCategoryService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Objects;

@RestController
@Slf4j
public class SubjectController {
    @Autowired
    private SubjectCategoryService subjectCategoryService;

    @Autowired
    private SubjectCategoryMapper subjectCategoryMapper;

    @GetMapping("/getAllCategory")
    public Result<List<SubjectCategoryDto>> getAllCategory(){
        return Result.getSuccess(subjectCategoryService.getAllCategory());
    }
}
